<script src="lib/bootstrap-datepicker.js"></script>
<script src="lib/plupload-2.1.2/js/plupload.full.min.js"></script>

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <strong>
                    <div>
                        添加费用信息
                    </div>
                </strong>
            </div>

            <div class="panel-body">
                <form name="uploadForm" class="form-horizontal" role="form" ng-submit="createOrUpdate()">
                    <div class="form-group" ng-show="error_msg">
                        <div class="col-sm-offset-1 col-sm-11">
                            <div class="alert alert-danger" role="alert">{{error_msg}}</div>
                        </div>
                    </div>

                    <div class="form-group" ng-hide="role == 4">
                        <label for="province" class="col-sm-2  col-sm-offset-2 control-label">所属省份</label>

                        <div class="col-sm-4 ">
                            <select ng-model="province"
                                    ng-change="provinceChanged(province)"
                                    class="form-control" id="province"
                                    ng-options="item._id as item.name for item in provinces">
                                <option value="">请选择省份</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group" ng-hide="role == 4">
                        <label for="hospital" class="col-sm-2  col-sm-offset-2 control-label">所属医院</label>

                        <div class="col-sm-4 ">
                            <select id="hospital"
                                    ng-model="hospital"
                                    class="form-control"
                                    ng-change="hospitalChanged(hospital)"
                                    ng-options="item._id as item.name for item in hospitals">
                                <option value="">请选择医院</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="office" class="col-sm-2  col-sm-offset-2 control-label">所属科室</label>

                        <div class="col-sm-4 ">
                            <select id="office"
                                    ng-model="office"
                                    class="form-control"
                                    ng-change="officeChanged(office)"
                                    ng-options="item._id as item.name for item in offices">
                                <option value="">请选择科室</option>
                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="doctor" class="col-sm-4 control-label">主治医生</label>
                        <div class="col-sm-4">
                            <select id="doctor"
                                    ng-model="doctor"
                                    class="form-control"
                                    ng-change="doctorChanged()"
                                    ng-options="item._id as item.name for item in doctors">
                                <option value="">请选择医生</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="doctor" class="col-sm-4 control-label">病人信息</label>
                        <div class="col-sm-4">
                            <select id="patient"
                                    ng-model="patient"
                                    class="form-control"
                                    ng-options="item._id as item.name for item in patients">
                                <option value="">请选择病人</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="fee" class="col-sm-4 control-label">费用金额</label>
                        <div class="col-sm-4">
                            <input type="text"   class="form-control" id="fee" placeholder="请输入费用金额" ng-model="fee">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="time" class="col-sm-4 control-label">时间日期</label>
                        <div class="col-sm-4">
                            <div class="dropdown">
                                <a class="dropdown-toggle" id="dropdown1" role="button" data-toggle="dropdown" data-target="#"
                                   href="">
                                    <div class="input-group">
                                        <input type="text" id="time" class="form-control" ng-model="time">
                                        <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                    </div>
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                    <datetimepicker ng-model="time"
                                                    data-datetimepicker-config="{ dropdownSelector: '#dropdown1',startView:'day', minView:'day'}"></datetimepicker>
                                </ul>
                            </div>
                        </div>
                    </div>

                    <div class="form-group span6">
                        <label for="desc" class="col-sm-2 col-sm-offset-2 control-label">描述</label>

                        <div class="col-sm-4">
                            <textarea class="form-control" required="true" class="form-control" id="desc"
                                      ng-model="desc" rows="3"></textarea>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="btn btn-default col-sm-offset-4 col-sm-1">确定</button>
                        <button type="button" class="btn col-sm-1 cancel_btn" ng-click="cancel()">取消</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>